package com.kuang.demo.mapper.wx;

import com.kuang.demo.bean.wx.CouponExechangeStore;
import com.kuang.demo.bean.wx.CouponExechangeUser;
import com.kuang.demo.bean.wx.CouponSelectlist;
import com.kuang.demo.bean.wx.WXCoupon;
import org.apache.ibatis.annotations.Param;

import java.util.Calendar;
import java.util.List;

public interface WXCouponMapper {
    WXCoupon.DataBean selectById(@Param("id") int id);

    int selectCount(@Param("userId") int userId);

    List<Integer> selectCoupIdByUserId(@Param("status") int status);

    int selectAllCount();

    List<WXCoupon.DataBean> selectAll();


    WXCoupon.DataBean selectOneById(@Param("couponId") Integer couponId);

    int insertCoupon(@Param("time") String time, @Param("userId") int userId, @Param("dataBean") WXCoupon.DataBean dataBean);

    int selectCountListByStatus(@Param("id") int id);

    List<CouponSelectlist.DataBean> selectCouponList(@Param("id") int id);

    List<Integer> selectCountList(@Param("id") int id);


    CouponExechangeStore selectCouponIdByCode(@Param("code") String code);

    int selectBoolHave(@Param("id") int id);

    int addCouponToUser(@Param("userId") int userId, @Param("couponId") int couponId, @Param("rightNow") String rightNow, @Param("endTime") String endTime);
}
